home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / Misc / TN.MISC.011 < prev    next >
Encoding:
Text File  |  1989-05-03  |  2.1 KB  |  40 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. Apple II Miscellaneous
  7. #11:    Examining the $C800 Space from AppleSoft
  8.  
  9. Revised by:    Matt Deatherage                                       May 1989
  10. Written by:    John Bennett                                       August 1987
  11.  
  12. This Technical Note discusses examining the $C800 space from AppleSoft BASIC 
  13. with PEEK statements.
  14. Changed since January 1989:  Corrected the revision author name.
  15. _____________________________________________________________________________
  16.  
  17. Both the 6502 and 65816 microprocessors perform a false read during absolute-
  18. indexed instructions.  When AppleSoft interprets a PEEK statement, it 
  19. performs an absolute-indexed LDA instruction with a base address such that a 
  20. false read from $CFxx is performed.  This read takes place during the formula 
  21. translation of the expression passed to PEEK, not during the actual loading of 
  22. the value.
  23.  
  24. Some peripheral cards have been designed to deselect their $C800 ROM space 
  25. any time a $CF value is placed on the high-order address lines of the address 
  26. bus.  Therefore, if you use the AppleSoft PEEK statement to examine an address 
  27. in the $C800 space of such a peripheral card, the $C800 space will be turned 
  28. off when the statement is interpreted, and the value returned by the statement 
  29. will not reflect the actual value in the $C800 ROM.
  30.  
  31. The 65C02, on the other hand, has been designed so that a false read is not 
  32. performed for an absolute-indexed LDA instruction.  As a result, if the PEEK 
  33. statement is used to examine the $C800 space of the same peripheral card on an 
  34. enhanced Apple IIe (or any other Apple II with a 65C02 installed), the $C800 
  35. space will not be deselected, and the value returned by the statement will 
  36. accurately reflect the value in the $C800 ROM.
  37.  
  38. If it is absolutely necessary to examine the $C800 space from an AppleSoft 
  39. BASIC program, it is safer to use a assembly-language routine to examine the 
  40. addresses and pass the results to the BASIC application.